package com.itheima;

import java.util.Scanner;

public class CharCount {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("Please input a string:");
        String str = sc.nextLine();
        int cnt_little = 0;  //小写字母
        int cnt_num = 0;     //数字
        int cnt_upper = 0;   //大写字母

        for (int i = 0; i < str.length(); i++) {
            if ((str.charAt(i) >= 'a') && (str.charAt(i) <= 'z'))
                cnt_little ++;
            else if( (str.charAt(i) >= '0') && (str.charAt(i) <= '9'))
                cnt_num ++;
            else if((str.charAt(i) >= 'A') && (str.charAt(i) <= 'Z'))
                cnt_upper ++;
            else
                continue;
        }
        System.out.println("The count of little char is :" + cnt_little);
        System.out.println("The count of number is :" + cnt_num);
        System.out.println("The count of upper char is :" + cnt_upper);
    }
}